package MyGO.controller;

import MyGO.Data.GlobalData;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.HBox;

public class DiagnoseController {
    @FXML
    private Label PID;
    @FXML
    private Label PIDW;
    @FXML
    private Label Page;
    @FXML
    private Label PageW;
    @FXML
    private Label Pgender;
    @FXML
    private Label PgenderW;
    @FXML
    private Label Pname;
    @FXML
    private Label PnameW;
    @FXML
    private Label label1;
    @FXML
    private Label label21;
    @FXML
    private Label label211;
    @FXML
    private Label label2111;
    @FXML
    private Label label_way;
    @FXML
    private HBox PatientInfo;
    @FXML
    private TextField tf_advice;
    @FXML
    private TextField tf_diagnose;
    @FXML
    private Button b_summit;
    @FXML
    private Button B_reset;




    @FXML
    void Reset(ActionEvent event) {
        flash();
    }

    @FXML
    void Summit(ActionEvent event) {
        GlobalData.trackForm.setDiagnoseResult(tf_diagnose.getText());
        GlobalData.trackForm.setAdvice(tf_advice.getText());
        flash();
    }

    public void flash() {
        tf_diagnose.clear();
        tf_advice.clear();
        GlobalData.trackForm.setStatus_main("完成");
        GlobalData.doctor.deleteUsedAmount();
    }

}
